/**
 * 作者: hxl
 * 日期: 2024-12-14 21:37:31
 * 备注: 七天乐任务配置表
 */
package com.motu.monstercity.server.game.commondata.act;

import io.vertx.core.json.JsonObject;

public class ActTaskModel {
    protected int id; // id
    protected int taskGroupId; // 期数
    protected int type; // 重置类型 (1每日重置；2活动期间)
    protected int taskType; // 任务类型
    protected long num1; // 需要数量
    protected String reward; // 奖励道具
    protected int integral; // 完成任务获得的积分
    protected int num2; // 参数2
    protected byte getMainTask; // 是否从主线任务继承 (1:是；0:否)
    protected byte firstDayOpen; // 是否首日就开启 (1:是；0:否)

    public ActTaskModel() {
    }

    public ActTaskModel(JsonObject obj) {
        id = obj.containsKey("id") ? obj.getInteger("id") : 0;
        taskGroupId = obj.containsKey("task_group_id") ? obj.getInteger("task_group_id") : 0;
        type = obj.containsKey("type") ? obj.getInteger("type") : 0;
        taskType = obj.containsKey("task_type") ? obj.getInteger("task_type") : 0;
        num1 = obj.containsKey("num1") ? obj.getLong("num1") : 0;
        reward = obj.containsKey("reward") ? obj.getString("reward") : "";
        integral = obj.containsKey("integral") ? obj.getInteger("integral") : 0;
        num2 = obj.containsKey("num2") ? obj.getInteger("num2") : 0;
        getMainTask = obj.containsKey("get_main_task") ? obj.getInteger("get_main_task").byteValue() : 0;
        firstDayOpen = obj.containsKey("first_day_open") ? obj.getInteger("first_day_open").byteValue() : 0;
    }

    public int getId() {
        return id;
    }

    public int getTaskGroupId() {
        return taskGroupId;
    }

    public int getType() {
        return type;
    }

    public int getTaskType() {
        return taskType;
    }

    public long getNum1() {
        return num1;
    }

    public String getReward() {
        return reward;
    }

    public int getIntegral() {
        return integral;
    }

    public int getNum2() {
        return num2;
    }

    public byte getGetMainTask() {
        return getMainTask;
    }

    public byte getFirstDayOpen() {
        return firstDayOpen;
    }
}
